calltoarmsfandomcom-20200213-history
Modding/Files
Intro A list of interesting data files and summaries of what they contain. Very much a work in progress. List of Files human.ext *gamelogic\properties\ *Basic properties for all humans: movement {Chassis "foot"}, 'armor' (volume thickness) values, {Sensor}s, ... *{brain} section defines a few detection and behavior ranges (see also {Sensor}) animal.ext *gamelogic\properties\ *Like human.ext but far fewer properties: sensor, movement, a few others vehicle.ext car.ext vehicle *.def files *entity\-vehicle\... *Bulk of the vehicle properties are here: volume listing, armor values, crew list, vision, ammo inventory, turret speed *several includes for related vehicle files (e.g. tank.ext, crew.ext, ...) *armor & volume locations are relative to 3D model files (which you don't have access to) vehicle *.mdl files *entity\-vehicle\... *Primarily a text-based skeleton definition file, there is a matrix & position for each bone in the vehicle **These could potentially be tweaked for non-CtA content to fix bone orientation problems (e.g. with the turret view) **Each bone has either: ***a {position}--presumably its XYZ coordinate position in the model, or ***a {Matrix34}--presumably its XYZ orientation, plus its XYZ position (the last row of the matrix). ***Though the order could by YZX, etc. (it's probably whatever 3DS MAX normally outputs). *There are also links to animation names, and some key parameters--identifying which bones are guns, sights, turrets, etc. **Gun rotation (depression/elevation) {limits} are also defined here (they are not in the *.def file, which contains only rotation speed). \gun\.presets *gamelogic\set\stuff\gun\ *Set of (define)s used by "gun"s (i.e. large caliber weapons, not "smallarms") \smallarms\.presets *gamelogic\set\stuff\smallarms\ *Set of (define)s used by "smallarms" (handheld weapons, including RPGs & knives) breed files *gamelogic\set\breed\... * *.set **Delineate the features of each human type (soldier or civilian) **"perk" level (see perks_generic.inc), "veterancy" level, inventory, "skin" type (i.e. model file, see entity\humanskin\...) *'perks_generic.inc' **Defines several levels of characteristic & abilities **Health, health regen, stamina, stamina regen, vision (although this is always set to "human"), speed, weapon & melee ability levels **Weapon ability levels appear to refer to gamelogic\set\ability\..., particularly ability_generic.inc nationality *.set files *gamelogic\set\multiplayer\armies\ *One *.set file for each nationality containing only: an {id} #, a {title} link, and an {icon} link to a flag icon common.set *gamelogic\set\multiplayer\units\common.set *Short file containing only a short set of includes for {unit}: cp.set, squads.set, vehicles.set vehicles.set *gamelogic\set\multiplayer\units\vehicles.set *Contains the defines used by nationality vehicles_XXX.set files vehicles_XXX.set *gamelogic\set\multiplayer\units\vehicles_XXX.set *There is one set for each nation (e.g. vehicles_grm.set) *Vehicles on this list will appear as a multiplayer purchase button *The defines are located in vehicles.set (same directory) squads.set *gamelogic\set\multiplayer\units\squads.set *Defines infantry squad composition(?) and purchase cost *Includes its own (define)s at the beginning of the file *See cp.set cp.set *gamelogic\set\multiplayer\units\cp.set *Duplicate squad composition(?) and CP purchase cost *includes its own (define)s *See squads.set desc.lng *to Arms\localization\desc.lng *Contains the text descriptions of units and weapons *Other files in the same folder contain text that appears in the game (tips, etc.) *You can add a "localization" folder to your mod alongside the "resources" folder. library.reg *gamelogic\set\registry\library.reg *This file lists many of the folder links that control the game's (or your mod's) directory structure--definition files for: vehicles, weapons, soldiers, items (ammo & stuff), and fauna. *Each entry also contains link(s) to the appropriate portion of the desc.lng file--telling the game where to find the name strings for that set of entities. *(Don't know what {optLoc} refers to) registry.reg *gamelogic\set\registry.reg *This file lists all the other registry files *It also identifies the {common_textures} folder ("/texture/common")--which is perhaps where the "$" reference comes from. bot.data.lua *gamelogic\script\multiplayer\bot.data.lua *This file contains a purchase priority list of every squad and vehicle *It is probably necessary for the AI to make unit purchases. interaction_entity folder (*.inc files) *gamelogic\set\interaction_entity\... *Folder and a couple of subfolders containing a set of *.inc files *The files define how different entities (units, vehicles, some constructions) react to being hit/damaged. interaction_entity folder *gamelogic\set\interaction_terrain\... *set of files that define how terrain reacts to being driven on and damaged (see the *.inc files in the effects subfolder) Directory Structure CtA is very particular about its folder structure, and that includes where you put your modded files. Files are interlinked with numerous references between them, so be very careful to match existing organization unless you really know what you are doing. Here is an incomplete list of folders, with some of the important ones for modders called out. List of Directories *localization **mission *resource **entity *** ***construction *** ***-fauna ***flora ***fx ***''humanskin: directory per human group containing settings (*.def), skeleton (*.mdl), material (*.mtl), & model files (*.ply & *.vol); material files have ''links to texture files which tend to be in \texture\common\... ***''inventory'' ****''-ammo: directory per ammo type containing settings (*.def), skeleton (*.mdl), material (*.mtl), & model files (*.ply & *.vol); material files have ''links to texture files which tend to be in \texture\common\... ****''-weapon: ditto but for handheld weapons ***landscape ***service ***-vehicle ****civilian ****extra ****grm: directory per vehicle containing settings (*.def), skeleton (*.mdl), material (*.mtl), & model files (*.ply & *.vol); material files have ''links to texture files which tend to be in \texture\common\... ****''usa: ditto for US vehicles **interface: (just a couple of splash screens) **texture ***common **** (lots of pak files; some key ones are listed below) ****humanskin: civilian, soldier, head, & helmet textures referenced by \entity\humanskin\... ****inventory: weapon & ammo textures referenced by \entity\inventory\... ****vehicle, vehicle2, vehicle3: vehicle textures referenced by \entity\-vehicle\... *** ***fx: explosions, tracers, etc. ***land ***wound ** **properties ***''construction_generic.inc: are armor types defined here? ***animation ***human_fsm ***selection ***shadow **script ***multiplayer **''set: "registry.reg" contains links to other *.reg files, the common texture folder shortcut (appears in other files as "$") ***''ballistics.set: damage "damping" and some other features are described here along with some cryptic ;comments. ***''tp_control.set'': "third-person" refers to direct control mode and this file contains a variety of visual/camera/control settings (varied by difficulty level) for direct control (and first-person) mode. ***ability ***blow ***breed ****civilian ****''mp: subfolders by nationality (usa, grm) with ability files, texture, portrait, & icon links (to \interface\scene\...) ****special ***difficulty ***environment ***interaction_entity: series of files where where the response to damage & impact is defined for various entities (humans, vehicles, small terrain objects, etc.)--actual logic statements occur in these files implying that at least some of the combat and other interactions are exposed to editing. ****''cannon.inc: weapon penetration and damage at some level is handled here. ****''tank: AFV damage response files are here ***interaction_terrain: same as above but for ground types (grass, water, etc.) ***multiplayer: *.set (& *.inc) files that control what units are available in multiplayer ****armies: short *.set files for each faction giving id #, breed folder(?), and flag icon ****games: *.set & *.inc files that define each multiplayer game type, not sure if there are others located elsewhere ****units: *.set files that list what types of squads and vehicles are available in multiplayer for each faction ***panel_control ***registry: "library.reg" is the only centralized list of folder references(?), unit.reg lists a {vehicle_view} type for very vehicle in the game ***stuff: gun & shell, smallarms & ammo are related and equivalent folders ****_settings ****ammo: inventory values and tracer fx for each smallarms ammo type ****body ****bombing ****capacity ****content ****explosive ****gun: all ammo characteristics (damage, speed, etc.), crosshair type, vignette type, sound, and reload time per vehicular gun ****head ****med ****reactive ****shell: inventory values and pattern type for each vehicular ammo type;equivalent to "ammo" folder) ****smallarms: all ammo characteristics (damage, speed, etc.), zoomed-in image, sound, and reload time per vehicular smallarms weapon; (equivalent to "gun" folder) ****special ***talk ***target ****''ammo.set: tells AI preferred ammo types to use depending on target ***tip ***vision **shader ***dx10 ****postprocess *****lenseffects: there are *.inc files in here defining various camera fx such as the look of the various night vision modes ("thermal_vision.inc", etc.) ** **interface ***scene ****''portrait: unit portraits ****squad: hovering selection icons ****unit_icon: purchase button images ****unit_icon_small: smaller purchase button images (not sure where these are used yet; the older MoW games don't have this folder) ** , **map ** **music ** **sound ** **video Modifying the Default Directory Structure If your mod is complex, you may want to create some unique directories and segregate your assets from the standard game assets. This would improve compatibility with other mods, reduce the need to update core game files every time there is an update, etc. It is a complex undertaking, however, so proceed with caution. Here are some tips: How to write folder links '';An (include) has no leading "/" if it refers to files in the same folder: (include "thisfolder/subfolder/file.ext") ;But it does need one if referring to another folder: (include "/otherfolder/file.ext") ;If you are referencing a texture from the {common_textures} folder ;(see /set/registry.reg), you don't use a leading "/", just the "$": {diffuse "$/vehicle/btr80"} ;But if you change the texture directory, you'll need to refer to it 'explicitly' ;and use the leading "/": {diffuse "/texture/newfolder/vehicle/btr80"} *'Explicit' folder references start with a leading "/" *The game assumes that any explicit references start under "resource" folder, so: {diffuse "/texture/newfolder/vehicle/btr80"} ;refers to ...Call to Arms/resource/texture/newfolder/vehicle/btr80.dds Changing Texture Folders *See "How to write folder links" above *For textures, the file extension is left off, the game assumes the extension is *.dds(?) *To make your own texture folder(s) for texture references in *.mtl files: use an explicit folder reference, and put the folder(s) anywhere you want under /resource/ *You can also move textures into the vehicle's (soldier's, etc.) entity directory and remove folders from *.mtl file altogether: ;So, instead of: {material bump {diffuse "$/vehicle/car"} {bump "$/vehicle/car_bp"} {specular "$/vehicle/car_sp"} {color "230 230 230 25"} {blend none} } ;...you'd have: {material bump {diffuse "car"} {bump "car_bp"} {specular "car_sp"} {color "230 230 230 25"} {blend none} } Coming up... *Changing Ammo folders *Changing Weapon folders *Changing Vehicle folders *Changing Breed folders *Changing Scene subfolders (adding new icons, portraits, purchase buttons) *Adding a new nation Category:Modding